<!DOCTYPE html >
<html>
<head>
    <link rel="stylesheet" href="demos.css" type="text/css" media="screen" />
    
    <script src="../libraries/RGraph.common.core.js" ></script>
    <script src="../libraries/RGraph.hbar.js" ></script>
    <!--[if lt IE 9]><script src="../excanvas/excanvas.js"></script><![endif]-->
    
    <title>A horizontal bar chart fetching data via AJAX</title>

    <meta name="description" content="A horizontal bar chart fetching data via AJAX" />
</head>
<body>

    <h1>A horizontal bar chart fetching data via AJAX</h1>

   <canvas id="cvs" width="600" height="600">[No canvas support]</canvas>

   <script>
       function drawHBar (data)
       {
           var hbar = new RGraph.HBar('cvs', data)
               .Set('grouping', 'grouped')
               .Set('vmargin', 5)
               .Set('labels', ['Charlie','Jake','Luis','Jack','Bernie','Luis','Bob','Joe','Jack','Cynthia'])
               .Set('colors', ['Gradient(white:#3366CC:#3366CC)'])
               .Draw();
       }
       
       RGraph.AJAX.getCSV('/getdata.html', drawHBar);
   </script>

    <p>
        <a href="./">&laquo; Back</a>
    </p>

</body>
</html>